describe('Common.coffee', ->
  beforeEach ->
    # do nothing

  describe('Error class', ->
    it 'can take message', ->
      target = new Error('message!!')
      expect(target.message).toEqual('message!!')
  )

  describe('html_escape()', ->
    it 'can escape html', ->
      html_string = 'this is <font>test </font>string <br>.'
      expect_string = 'this is &lt;font&gt;test &lt;/font&gt;string &lt;br&gt;.'
      expect(html_escape(html_string)).toEqual(expect_string)

    it 'do not escape non html', ->
      html_string = 'this is fonttest /fontstring br.'
      expect_string = 'this is fonttest /fontstring br.'
      expect(html_escape(html_string)).toEqual(expect_string)
  )
)